package com.hoshiicloud.goods.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.query.OmnipotentParam;
import com.hoshiicloud.common.query.OmnipotentWrapper;
import com.hoshiicloud.common.update.UpdateBatchParam;
import com.hoshiicloud.goods.entity.sku.BaseSku;
import com.hoshiicloud.goods.param.ListSkuSpuParam;
import com.hoshiicloud.goods.param.sku.SkuBaseListParam;
import com.hoshiicloud.goods.vo.ListSpuSkuVo;
import com.hoshiicloud.goods.vo.sku.BaseSkuVo;

import java.util.List;

/**
 * <p>
 * 基础商品表SKU 服务类
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-04
 */
public interface BaseSkuService extends IService<BaseSku> {

    BaseSku getById(Long id);

    boolean save(BaseSku entity);

    boolean updateById(BaseSku entity);

    IPage getPage(IPage page, Wrapper queryWrapper, String key);

    boolean deleteById(Long id);

    List<BaseSku> getByIds(List<Long> ids, String key);

    /**
     * 多条件批量查询
     */
    List<BaseSku> listBaseSku(BaseSku baseSku);

    /**
     * 批量下架baseSku
     */
    Boolean baseSkuShelvesDown(List<BaseSku> baseSkus, Integer status);


    BaseSku saveBaseSku(BaseSku entity);

    /**
     * 根据自定义条件进行批量更新
     */
    boolean updateBatchByWrapper(UpdateBatchParam<BaseSku> updateBatchParam);

    List<BaseSkuVo> listByParam(SkuBaseListParam param, String key);

    /**
     * 批量更新
     */
    boolean updateBatch(OmnipotentParam<BaseSku> param);

    /**
    * 批量查询
     */
    List<BaseSku> queryBatch(List<OmnipotentWrapper> params);
}
